import request from '@/utils/request'

// 查询进度跟踪列表
export function listDealProgressTracking(query) {
  return request({
    url: '/progressTracking/dealProgressTracking/list',
    method: 'get',
    params: query
  })
}

// 查询进度跟踪详细
export function getDealProgressTracking(id) {
  return request({
    url: '/progressTracking/dealProgressTracking/' + id,
    method: 'get'
  })
}

// 保存进度跟踪
export function saveDealProgressTracking(data) {
  return request({
    url: '/progressTracking/dealProgressTracking/save',
    method: 'post',
    data: data
  })
}

// 删除进度跟踪
export function delDealProgressTracking(id) {
  return request({
    url: '/progressTracking/dealProgressTracking/' + id,
    method: 'delete'
  })
}

// 导出进度跟踪
export function exportDealProgressTracking(query) {
  return request({
    url: '/progressTracking/dealProgressTracking/export',
    method: 'get',
    params: query
  })
}

// 根据条件获取已支付金额
export function gainTheAmountPaidByDealId(dealId, startDate, endDate) {
  return request({
    url: '/progressTracking/dealProgressTracking/gainTheAmountPaidByDealId/' + dealId + '/' + startDate + '/' + endDate,
    method: 'get'
  })
}

